<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:url('course/codeIndex', ['id' => $id, 'sku_id' => $sku_id])}">兑换码列表</a></li>
			<li><a href="{:url('course/addCode', ['id' => $id, 'sku_id' => $sku_id])}">添加兑换码</a></li>
		</ul>

		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="80">序号</th>
					<th>兑换码</th>
					<th>开始时间</th>
					<th>结束时间</th>
					<th>状态</th>
					<th>分配时间</th>
					<th>关联订单</th>
					<th>添加时间</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="list" item="vo">
				<tr>
					<td>{$vo.id}</td>
					<td>{$vo.code_name}</td>

					<td>{$vo.start_time}</td>
					<td>{$vo.end_time}</td>
					<td>
						<if condition="$vo.status eq 1">
							<span class="label label-success">未分配</span>
						<elseif condition="$vo.status eq 2"/>
							<span class="label label-danger">已分配</span>
						<elseif condition="$vo.status eq 3"/>
							<span class="label label-success" style="color: gray;">已失效</span>
						<elseif condition="$vo.status eq 4"/>
							<span class="label label-danger">已退款</span>
						<else/>
							<span class="label label-danger">未知状态</span>
						</if>
					</td>
					<td>{$vo.issue_time}</td>
					<td>{$vo.order_number}</td>
					<td>{$vo.add_time}</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>